home *** CD-ROM | disk | FTP | other *** search
- Path: cs.utk.edu!byers
- From: byers@duncan.cs.utk.edu (Stephen Byers)
- Newsgroups: comp.lang.c
- Subject: Re: passing 2D arrays to functions
- Date: 19 Apr 1996 02:15:19 GMT
- Organization: Computer Science Dept, University of Tennessee, Knoxville
- Message-ID: <BYERS.96Apr18221519@duncan.cs.utk.edu>
- References: <4l58sk$l6r@harbinger.cc.monash.edu.au>
- NNTP-Posting-Host: duncan.cs.utk.edu
- In-reply-to: pdrod1@mdw084.cc.monash.edu.au's message of 18 Apr 1996 11:26:12 GMT
-
- When you pass a two-dimensional array, it's different (a little):
- assume: char a[10][15];
-
- foo(char x[][15])
- {}
-
- then call the function: foo(a)
-
- The first dimension can be left out. All the others must be included.
- --
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Stephen Byers Internet: byers@cs.utk.edu
- Lab Assistant, Dept. of Computer Science
- University of Tennessee, Knoxville
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-